package com.crowntit.types.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class AppException extends RuntimeException {

    private static final long serialVersionUID = 5248966143282735733L;

    private String code;
    private String info;

    public AppException(String code, Throwable cause) {
        this.code = code;
        super.initCause(cause);
    }

    public AppException(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public AppException(String code, String info, Throwable cause) {
        this.code = code;
        this.info = info;
        super.initCause(cause);
    }
}
